<!-- /* Description for file.
 * 加入项目
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/resources
 * @since         ues
 * @version       V0.0.1
 * @modifiedby   会兵2011年0630
 * @lastmodified  会兵2011年0630
 */
 -->
<?php
	echo $html->css ( 'style' );
	echo $html->css ( 'tab' );
	echo $javascript->link ( 'jquery' );
?>
<script type="text/javascript">
	
	//项目公司与项目职位的关联菜单
	$(function(){
		$("#company").change(function(){
			var IndustryDroptoplist = $(this).val();
			if(IndustryDroptoplist!="")
			{
				$.post("<?php echo ROOT_WEB_PATH; ?>/visitorrecords/getrecruitposition/",{
					Recruitposition : $(this).val()
					},
				function(data,textStatus){
						 $("#recruitposition:eq(0)>option").remove();
						 $(data).find("aaa").each(function(){
						//	 alert($(this).attr("name"));
							 $("#recruitposition:eq(0)").append("<option></option>");
							 $("#recruitposition:eq(0)>option:last").val($(this).attr("name")).html($(this).text());
					 	 });
				});
			}
			else
			{
				$("#recruitposition:eq(0)>option").remove();
				$("#recruitposition:eq(0)").append("<option></option>");
				$("#recruitposition:eq(0)>option:last").val("").html("不选");
			}
		});
		//项目职位与项目的关联菜单
		$("#recruitposition").change(function(){
			var IndustryDroptoplist = $(this).val();
			if(IndustryDroptoplist!="")
			{
				$.post("<?php echo ROOT_WEB_PATH; ?>/visitorrecords/getcompanymanage/",{
					Projectmanagement : $(this).val()
					},
				function(data,textStatus){
						 $("#projectmanagement:eq(0)>option").remove();
						 $(data).find("aaa").each(function(){
						 $("#projectmanagement:eq(0)").append("<option></option>");
						 $("#projectmanagement:eq(0)>option:last").val($(this).attr("name")).html($(this).text());
					  });
					});
			}
			else
			{
				$("#projectmanagement:eq(0)>option").remove();
				$("#projectmanagement:eq(0)").append("<option></option>");
				$("#projectmanagement:eq(0)>option:last").val("").html("不选");
			}
		});

		$("#closediv").click(function(){
			window.close();
		});

	});
</script>
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Visitor Management');//一级目录
										   echo '>';echo __('Visitorrecord');//一级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('Visitor Management Addtoprojectsome',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->
<div class="tabflex">
<?php echo $form->create('Visitorrecord',array('action'=>'addtoprojectsome','type'=> 'post'));?>
<?php echo $form->hidden('ids',array('value'=>$ids));?>
<fieldset><legend><?php __('Visitor Management Addtoprojectsome');?></legend>
	<table width="100%" cellspacing="0" cellpadding="0" border="0"
	style="text-align: left">
		<tr>
			<td width="100px">公司名称： </td>
		    <td>
		    	<?php $options = array();
							foreach($companymanagelist as $eachrecord)
							{
								$options[$eachrecord['Companymanage']['id']] = $eachrecord['Companymanage']['name'];
							}
							echo $form->input('company',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'company'));		
						?>
		    </td>
		</tr>
    	<tr>
    	<td>职位名称：</td>
	    <td>
	    	<?php $options = array();
						foreach($recruitpositionlist as $eachrecord)
						{
							$options[$eachrecord['Recruitposition']['name']] = $eachrecord['Recruitposition']['name'];
						}
						echo $form->input('recruitposition',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'recruitposition'));		
					?>
	    </td>
	    <tr>
		    <td>项目编号：</td>
		    <td>
		    	<?php $options = array();
							foreach($projectmanagementlist as $eachrecord)
							{
								$options[$eachrecord['Projectmanagement']['id']] = $eachrecord['Projectmanagement']['projectCode'];
							}
							echo $form->input('projectmanagement',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'projectmanagement'));		
						?>
		    </td>
	    </tr>
		<tr>
		<td>
			<?php echo $form->button('确定',array('type'=>'submit','class'=>'btn2'));?>
		</td>
		<td>
			<?php echo $form->button('关闭',array('id'=>'closediv','class'=>'btn2'));?>
		</td>
	</tr>
	</table>
</fieldset>
<?php echo $form->end();?>
</div>